import {API_CONFIG} from "../config/index.js";
import request from "./index.js";

// deployment
// list
export const  getDeploymentListHandler = (clusterId,namespace)=>{
    return request(API_CONFIG.getDeploymentListApi,{clusterId,namespace},"GET",2000)
}

// delete
export const  deleteDeploymentHandler = (clusterId,namespace,name)=>{
    return request(API_CONFIG.deleteDeploymentApi,{clusterId,namespace,name},"POST",2000)
}
// create
export const  createDeploymentHandler = (clusterId,namespace,item)=>{
    return request(API_CONFIG.createDeploymentApi,{clusterId,namespace,item},"POST",2000)
}

// update
export const  updateDeploymentHandler = (clusterId,namespace,item)=>{
    return request(API_CONFIG.updateDeploymentApi,{clusterId,namespace,item},"POST",2000)
}